<template>
  <!-- 惊喜尝鲜· -->
  <section class="surprise-early-adopters">
    <!-- 惊喜尝鲜·  -->
    <h1>
      <span>惊喜尝鲜· </span>
      <span>{{ surprisePrice }}</span>
    </h1>
    <!-- 苏东坡... -->
    <div class="surprise-div" v-for="value of surpriseList" :key="value.title">
      <img :src="value.imgUrl" alt="" />
      <p class="title">{{ value.title }}</p>
      <p class="introductory">{{ value.introductory }}</p>
      <p class="describe">{{ value.describe }}</p>
    </div>
  </section>
</template>

<script>
import { reactive, ref } from "vue";
export default {
  setup() {
    // 惊喜尝鲜· 价格
    const surprisePrice = ref("¥26.9");
    // 惊喜尝鲜· 列表
    const surpriseList = reactive([
      {
        imgUrl: require("@/assets/images/声音剧/syj-14@2x.png"),
        title: "《苏东坡》声音剧惊喜礼包",
        introductory: "【神童育儿经】东坡宝宝一出生就吸光老家的灵气？",
        describe: "苏东坡的人生锦囊，让你比别人活得快乐",
      },
    ]);
    return {
      surprisePrice,
      surpriseList,
    };
  },
};
</script>

<style lang="less" scoped>
.surprise-early-adopters {
  font-family: PingFang SC;
  font-weight: bold;
  margin-bottom: 23px;
  h1 {
    font-size: 20px;
    color: #333333;
    margin-bottom: 42px;
    span {
      &:last-of-type {
        color: #fa601f;
      }
    }
  }
  .surprise-div {
    height: 102px;
    position: relative;
    background: #ffffff;
    box-shadow: 0px 0px 13px 0px rgba(234, 234, 234, 0.33);
    border-radius: 8px;
    img {
      position: absolute;
      width: 91px;
      height: 121px;
      left: 9px;
      bottom: 10px;
    }
    p {
      position: absolute;
      left: 111px;
      &.title {
        top: -22px;
        color: #d3a760;
        font-size: 11px;
      }
      &.introductory {
        top: 19px;
        line-height: 22px;
        font-size: 15px;
        color: #333333;
      }
      &.describe {
        bottom: 17px;
        font-size: 12px;
        color: #999999;
      }
    }
  }
}
</style>
